package lab02.Test18;

public class Test {
    public static void main(String[] args) {
        String name =" my name is Network crazy";
         //打印字符串长度
        System.out.println("字符串的长度："+ name.length());

        System.out.println("字符串的第一个字符："+name.charAt(0));

        System.out.println("字符串的最后一个字符："+name.charAt(name.length()-1));


        String[] result = name.split("");

        System.out.println("字符串的第一个单词"+result[0]+""+result[1]);

        System.out.println("字符串crazy的位置："+name.indexOf("crazy"));



    }
}
